import java.util.Scanner;
import java.lang.*;
import java.io.Console;

public class Test
{
	int guess;
	double roll;
	static boolean playing,active;
	public static void main(String [] args)
	{
		Test de = new Test();
		active = true;
		while(active == true)
		{
			de.derp();
		}
		System.out.println("Goodbye");
	}
	public void derp()
	{

		playing = true;
		Scanner get = new Scanner(System.in);
		roll = Math.floor(Math.random() * 100);
		while(playing == true)
		{
			System.out.print("Enter a guess: ");
			guess = get.nextInt();
			if(guess == roll)
			{
				System.out.println("You win!");
				System.out.print("Would you like to play again?: ");
				String pA;
				char pB;
				pA = get.next();
				pB = pA.charAt(0);
				if(pB == 'y')
				{
					System.out.println("Please wait.");
					try {
					Thread.sleep(2500); }
					catch(InterruptedException e) {
						System.out.println("fuck"); }
					System.out.println("Resetting");
					playing = false;
				}
				else if(pB == 'n')
				{
					playing = false;
					active = false;
				}
				else
				{
					System.out.println("Oh my god, Really? PLAY AGAIN.");
				}
			}
			else if(guess == 101)
			{
				roll = Math.floor(Math.random() * 100);
			}
			else if(guess < roll)
			{
				System.out.println("To low");
			}
			else if(guess > 102)
			{
				System.out.println("1 - 100 asshole.");
			}
			else if(guess > roll)
			{
				System.out.println("To high");
			}
			else
			{
				System.out.println("What the fuck did you do?");
			}
		}


	}
}